<template>
    <div class="flash-sale">
        <decoration-img
            width="100%"
            height="210px"
            :src="
                content.enabled === 1
                    ? getImageUrl(content.defaultImg)
                    : getImageUrl(content.customImg)
            "
            alt=""
        />
    </div>
</template>
<script lang="ts" setup>
import type { PropType } from 'vue'
import type options from './options'
import DecorationImg from '../../decoration-img.vue'
import useAppStore from '@/stores/modules/app'

const { getImageUrl } = useAppStore()
type OptionsType = ReturnType<typeof options>
const props = defineProps({
    content: {
        type: Object as PropType<OptionsType['content']>,
        default: () => ({})
    },
    styles: {
        type: Object as PropType<OptionsType['styles']>,
        default: () => ({})
    }
})
</script>

<style lang="scss" scoped></style>
